import * as types from './mutation-types'

export default {
  loadMainEntry({ commit }, req) {
    commit(types.LOAD_MAIN_ENTRY, req);
  },
  saveMainResponse({ commit }, res) {
    commit(types.SAVE_MAIN_RESPONSE, res);
  },
  loadPageData({ commit }, req) {
    commit(types.LOAD_PAGE_DATA, req);
  },
  markShouldReload({ commit }, should) {
    commit(types.MARK_SHOULD_RELOAD, should);
  },
  commitAction({ commit }, uri, id) {
    commit(types.COMMIT_ACTION, uri, id);
  },
  loadBadge({ commit }) {
    commit(types.LOAD_BADGE);
  },
  saveSeekData({ commit }, seek) {
    commit(types.SAVE_SEEK_DATA, seek);
  },
  saveSeekIndex({ commit }, index) {
    commit(types.SAVE_SEEK_INDEX, index);
  },
  saveQuerySession({ commit }, req) {
    commit(types.SAVE_QUERY_SESSION, req);
  },
  loadOptionSource({ commit }, option) {
    commit(types.LOAD_OPTION_SOURCE, option);
  },
  addInlineRow({ commit }) {
    commit(types.ADD_INLINE_ROW);
  },
  setInlineTableCom({ commit }, inlineTableCom) {
    commit(types.SET_INLINE_COM, inlineTableCom);
  },
  delInlineRow({ commit }, scope) {
    commit(types.DEL_INLINE_ROW, scope);
  },
  saveInlineRow({ commit }, scope) {
    commit(types.SAVE_INLINE_ROW, scope);
  },
  asSearchTemplate({ commit }, data) {
    commit(types.AS_SEARCH_TEMPLATE, data);
  },
  loadSearchTemplate({ commit }, uri) {
    commit(types.LOAD_SEARCH_TEMPLATE, uri);
  },
  delSearchTemplate({ commit }, data) {
    commit(types.DEL_SEARCH_TEMPLATE, data);
  },
  switchActiveName({ commit }, req) {
    commit(types.SWITCH_ACTIVE_NAME, req);
  },
  loadTransform({ commit }, req) {
    commit(types.LOAD_TRANSFORM, req);
  },
};
